{include file="common/head"}
<title>修改密码</title>
</head>
<body>
<article class="col-xs-12 col-md-5 cl pd-20">
	<form action="{:url('Index/changePwd')}" method="post" class="form form-horizontal" id="form-admin-add">
		<div class="row cl">
			<div class="formControls col-xs-8 col-sm-9">
				<input type="hidden" class="input-text" value="{$user_id.user_id}" placeholder="" id="user_id" name="user_id">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>旧密码：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="password" class="input-text" autocomplete="off" value="" placeholder="密码" id="password" name="password">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>新密码：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="password" class="input-text" autocomplete="off"  placeholder="确认新密码" id="password2" name="password2">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

{include file="common/footer"}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="{:$Think.config.__STATIC__}/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="{:$Think.config.__STATIC__}/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="{:$Think.config.__STATIC__}/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
$(function(){
	$("#form-admin-add").validate({
		rules:{
			password:{
				required:true,
			},
			password2:{
				required:true,
			},
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			$(form).ajaxSubmit(function(data){
				if(data.code ==1 || data.code ==2 || data.code ==3){
					layer.msg(data.msg,{
						icon:2,
						skin:'layer-ext-moon',
						time:1000
					});
				}else{
					layer.msg(data.msg,{
						icon:1,
						skin:'layer-ext-moon',
						time:1000
					},function(){
						// var index = parent.layer.getFrameIndex(window.name);
						parent.location.reload();
					});
				}
			});
		}
	});
});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>